<!DOCTYPE html>
<html>
<head>
  <title>全栈开发博客</title>
  <link href="./css/style.css" rel="stylesheet" type="text/css" media="all"/>
  <link href="./css/bootstrap.css" rel="stylesheet" type="text/css" media="all"/>
  <script src="./js/jquery.min.js"></script>
  <meta name="viewport" content="width=device-width, initial-scale=1">
  <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
  <script type="application/x-javascript"> addEventListener("load", function () {
    setTimeout(hideURLbar, 0);
  }, false);
  function hideURLbar() {
    window.scrollTo(0, 1);
  } </script>
  <script type="text/javascript" src="./js/move-top.js"></script>
  <script type="text/javascript" src="./js/easing.js"></script>
  <script type="text/javascript">
    jQuery(document).ready(function ($) {
      $(".scroll").click(function (event) {
        event.preventDefault();
        $('html,body').animate({scrollTop: $(this.hash).offset().top}, 1000);
      });
    });
  </script>
</head>

<body>
  <div class="header">
    <div class="container">
      <div class="header-info">
        <div class="logo">
          <a href="/posts"><img src="./images/logo.png" alt=" "/></a>
        </div>
        <div class="logo-right">
          <span class="menu"><img src="./images/menu.png" alt=" "/></span>
          <ul class="nav1">
            <% if (admin.username) { %>
             <li> <form action="/search" method="get">
                <table class="search-tab">
                    <tr>
                        <th style="display: none;" width="120">搜索范围:</th>
                        <td style="display: none;">
                            <select name="searchBy" id="">
                                <option value="username">姓名</option>
                            </select>
                        </td>
                        <th style="display: none;" width="70">关键字:</th>
                        <td style="display: none;"><input placeholder="关键字" name="keywords" value="<%= admin.username %>" id="" type="text"></td>
                        <td><a href="#"><input style="border-style:none; background-color: hsl(31, 46%, 16%); color:rgb(255, 251, 240);" value="个人主页" type="submit"></a></td>
                    </tr>
                </table>
            </form></li>
            <li><a href="/publication">发表文章</a></li>
            <li><a href="/logout">退出</a></li>
            <% } else { %> <li><a href="/login">登录</a></li>
             <li><a href="/register">注册</a></li>
              <% } %>
          </ul>
        </div>
        <div class="clearfix"></div>
        <script>
          $("span.menu").click(function () {
            $("ul.nav1").slideToggle(300, function () {
            });
          });
        </script>
      </div>
    </div>
  </div>

  <div class="content">
    <div class="container">
      <div class="content-text">
        <div class="title">
          <div class="some-title">
            <h3><a href="#">记录美好生活</a></h3>
          </div>
          <div class="john">
            <p style="color: rgb(46, 90, 2);">今日语录</p>
          </div>
          <div class="clearfix"></div>
          <div class="tilte-grid">
            <a href="single.html"><img src="images/xin.png" alt=" "/></a>
            <p class="Sed">
             <span>静，是一种气质，也是一种修养。诸葛亮云：＂非淡泊无以明志，非宁静无以致远。＂心浮气躁，是成不了大气候的。静是要经过锻炼的。古人叫做＂习静＂。唐人诗云：＂山中习静朝观槿，松下清斋折露葵＂。＂习静＂可能是道家的一种功夫，习于安静确实是生活于扰攘的尘世中人所不易做到的。
              人世间有许多事，想一想，觉得很意思。有时一个人坐着，想一想，觉得很有意思，会噗噗笑出声来。把这样的事记下来或说出来，便挺幽默。</span></p>
            </div>
            <div class="read">
              <a href="#" target="_blank"></a>
            </div>

            <!-- 文章列表 -->
            
            <% posts.forEach(function(post){ %>
              <div>
            <div class="border">
              <p>a</p>
            </div>

            <div class="some-title">
              <h3><a href="/modify?id=<%= post.id %>"><%= post.title %></a></h3>
            </div>
            <div class="read">
              <p>
                <form action="/search" method="get">
                  <table class="search-tab">
                      <tr>
                          <th style="display: none;" width="120">搜索范围:</th>
                          <td style="display: none;">
                              <select name="searchBy" id="">
                                  <option value="username">姓名</option>
                              </select>
                          </td>
                          <th style="display: none;" width="70">关键字:</th>
                          <td style="display: none;"><input placeholder="关键字" name="keywords" value="<%= post.username %>" id="" type="text"></td>
                          <td><input style="border-style:none; background-color: rgb(243, 236, 227);font-style: oblique;" value="<%= post.username %>" type="submit"></td>
                      </tr>
                  </table>
              </form>
                <a href="#"></a>
                
              </p>
            </div>
            <div class="clearfix"></div>
          <div style="text-align: right;">
            <span><%= post.time %></span>
          </div>
          <% if (post.username == admin.username) { %>
            <div class="read">
              <p>
                <a href="/delete?id=<%= post.id %>">删除</a>
                <a href="/revise?id=<%= post.id %>">修改文章</a>
              </p>
            </div>
            <% } %>

          <div class="border">
            <p>a</p>
          </div>
    </div><% }); %></div>
    

    <div class="categories">
      <div class="categ">
        <div class="cat">
          <h3>文章阅读排行榜</h3>
          <ul>
            <!-- 文章阅读排行榜 -->
            
            <li><a href="/posts/627b4b0755b3240e74e86bd0" >习近平：在庆祝中国共产主义青年团成立100周年大会上的讲话</a><span style="float: right">浏览(11)</span></li>
            
            <li><a href="/posts/627b4f7055b3240e74e86bd4" >美国要是禁用Windows系统怎么办</a><span style="float: right">浏览(3)</span></li>
            
            <li><a href="/posts/627b4d8d55b3240e74e86bd1" >青春向党,不负韶华</a><span style="float: right">浏览(1)</span></li>
            
            <li><a href="/posts/627b4f1f55b3240e74e86bd3" >Cloudflare、Deno 和 Node.js 三方合作，改善 JS 互操作性</a><span style="float: right">浏览(1)</span></li>
            
          </ul>
        </div>
        <div class="recent-com">
          <h3>图书推荐</h3>
          <ul>
            <li><a href="#" target="_blank">《平凡的世界》</a></li>
            <li><a href="#" target="_blank">《人世间》</a></li>
            <li><a href="#" target="_blank">《生活是很好玩的》</a></li>
            <li><a href="#" target="_blank">《季羡林散文集》</a></li>
            <li><a href="#" target="_blank">《Node.js实战》</a></li>
            <li><a href="#" target="_blank">《Android开发》</a></li>
            <li><a href="#" target="_blank">《HTML5+CSS3入门到精通》</a></li>
          </ul>
        </div>

      </div>
    </div>
    <div class="clearfix"></div>
    <div class="footer">
      <div class="container">
        <div class="footer-grids">
          <div class="footer-grid">
            <h3>博客生活</h3>
            <p>道路虽然拥挤,却是寂寞的,因为它没有品尝到爱。
              小草在大地寻找群聚,树木向天空寻找孤寂。
              尽管走下去,不必逗留着去采着花儿来保存,因为一路上花朵自会开放。
              小草呀,你的足步虽小,但是你拥有足下的土地。</p>
            </div>
            <div class="footer-grid">
              <h3>服务中心</h3>
              <ul>
                <li class="cap1"><a href="#" target="_blank">课程</a></li>
                <li><a href="#" target="_blank">读书</a></li>
                <li><a href="#" target="_blank">社区</a></li>
              </ul>
            </div>
            <div class="footer-grid">
              <h3>交流合作</h3>
              <ul>
                <li><a href="#">人才招聘</a></li>
                <li><a href="#">意见反馈</a></li>
                <li><a href="#">版权声明</a></li>
                <li><a href="#">服务条款</a></li>
              </ul>
            </div>
            <div class="clearfix"></div>
          </div>
        </div>
      </div>
    </div>
  </div>
</div>
<script type="text/javascript">
  $(document).ready(function () {
    $().UItoTop({easingType: 'easeOutQuart'});
  });
</script>
</body>
</html>
